package registryx

import (
	configx "config"

	"dubbo.apache.org/dubbo-go/v3"
	"dubbo.apache.org/dubbo-go/v3/registry"
)

var WithZookeeperServer = []registry.Option{
	registry.WithZookeeper(),
	registry.WithAddress(configx.ZookeeperURL),
	registry.WithUsername(configx.ZookeeperUser),
	registry.WithPassword(configx.ZookeeperPassword),
}

var WithNacosServer = []registry.Option{
	registry.WithNacos(),
	registry.WithAddress(configx.NacosURL),
}

var WithZookeeper = dubbo.WithRegistry(
	WithZookeeperServer...,
)

var WithNacos = dubbo.WithRegistry(
	WithNacosServer...,
)
